From: Florian Müllner Date: Sat, 9 Jul 2022 12:01:17 +0000 (+0200) Subject: systemActions: Disable power-off if querying support fails X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~263 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=415349c8526ca4485f6bd37be7c19579acb4c8d8;p=gnome-shell.git systemActions: Disable power-off if querying support fails Treating failure as success is weird. It's also most likely wrong, as the most likely reason is that gnome-session isn't running. Part-of: --- diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index b43f93a3d..6d0e0497c 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -331,10 +331,7 @@ const SystemActions = GObject.registerClass({ _updateHaveShutdown() { this._session.CanShutdownRemote((result, error) => { - if (error) - return; - - this._canHavePowerOff = result[0]; + this._canHavePowerOff = error ? false : result[0]; this._updatePowerOff(); }); }